/*
 * Class FileManager
 *
 * Version 1.0
 *
 * Friday, August 22, 2008
 *
 * Created by Palidino76
 */

package net.com.hydroPK.io;
import java.io.*;
import net.com.hydroPK.util.*;

public class FileManager {
        public void appendData(String file, String text) {
        BufferedWriter bw = null;
        try {
            FileWriter fileWriter = new FileWriter("./data/" + file, true);
            bw = new BufferedWriter(fileWriter);
            bw.write(text);
            bw.newLine();
            bw.flush();
            bw.close();
            fileWriter = null;
            bw = null;
        } catch (Exception exception) {
            Misc.println("Critical error while writing data: " + file);
        }
    }
}